<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  <title>创梦科技网站管理后台</title>
  <meta name="renderer" content="webkit">
  <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
  <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0">
  <link href="${ctx}/favicon.ico" rel="SHORTCUT ICON" />
  <link rel="stylesheet" href="${ctx}/static/admin/layui/css/layui.css" media="all">
  <link rel="stylesheet" href="${ctx}/static/admin/layui/css/admin.css" media="all">
  <style type="text/css">
  .contextmenu-box{
	position: absolute;line-height: 36px;padding: 5px 0;
	border: 1px solid #d2d2d2;background-color: white;z-index: 19940201;border-radius: 2px;white-space: nowrap;top:30px;
	/*width: 100px;height: 200px; */
  }
  .contextmenu-box ul li{
	padding: 0 15px;
  }
  .contextmenu-box ul li:hover{
	background-color: #eee;
	cursor: pointer;
  }
  </style>
  <script src="${ctx}/static/admin/layui/layui.js"></script>
  <script type="text/javascript" src="${ctx}/static/jquery/jquery.min.js"></script>
  <script type="text/javascript" src="${ctx}/static/jquery/jquery.jdirk.js"></script>
  <script>
  window.onbeforeunload = function(){
      return false;
  };
  
  layui.config({
    base: '${ctx}/static/admin/js/' //静态资源所在路径
  }).extend({
    index: 'index' //主入口模块
  }).use('index');
  var $;
  layui.use(['layer','jquery'], function () {
  	$ = jQuery = layui.$;
  	var layer = layui.layer;
  	setInterval(function(){
        $("#timerSpan").text($.date.toLongDateTimeString(new Date()));   
    },1000);
  });
  
  function selfInfo(){
     parent.layer.open({
         type: 2,
         title: '个人信息',
         area: ['700px', '300px'],
         fixed: false, //不固定
         maxmin: true,
         content: '${ctx}/sys_admin/main/self'
     });
  }
  
  function repwd() {
     parent.layer.open({
         type: 2,
         area: ['400px', '300px'],
         fixed: false, //不固定
         maxmin: true,
         content: '${ctx}/sys_admin/main/rePwd',
         btn: ['保存', '关闭'],
         yes: function (index, layero) {
             layero.find('iframe').contents().find('#submit-btn').click();
         },
         btn2: function (index, layero) {
             var index = layer.getFrameIndex(window.name);
             layer.close(index); //再执行关闭
         }
     });
  }

  function changeDept(val) {
      $.ajax({type: "POST",
          dataType: "json",
          url: '${ctx}/sys_admin/main/changeDept',
          data:{
              deptId: val
          },
          success:function(result){
              if(result.code == 0){
                  $('#refreshId').click();
              }
          }
      });
  }
  
  function logout() {
	  layer.confirm('确定要退出吗?', {
		  btn: ['确定','再考虑一下'] //按钮
		}, function(){
			top.location = "${ctx}/sys_admin/login/logout";
		}, function(){
	  });
  }
  
  </script>
  
  <!-- 百度统计 -->
  <script>
  var _hmt = _hmt || [];
  (function() {
    var hm = document.createElement("script");
    hm.src = "https://hm.baidu.com/hm.js?d214947968792b839fd669a4decaaffc";
    var s = document.getElementsByTagName("script")[0]; 
    s.parentNode.insertBefore(hm, s);
  })();
  </script>
</head>
<body class="layui-layout-body">
  
  <div id="LAY_app">
    <div id="main" class="layui-layout layui-layout-admin">
      <div class="layui-header">
        <!-- 头部区域 -->
        <ul class="layui-nav layui-layout-left">
          <li class="layui-nav-item layadmin-flexible" lay-unselect>
            <a href="javascript:;" layadmin-event="flexible" title="侧边伸缩">
              <i class="layui-icon layui-icon-shrink-right" id="LAY_app_flexible"></i>
            </a>
          </li>
          <li class="layui-nav-item" lay-unselect>
            <a id="refreshId" href="javascript:;" layadmin-event="refresh" title="刷新">
              <i class="layui-icon layui-icon-refresh-3"></i>
            </a>
          </li>
          <li class="layui-nav-item" lay-unselect>
            <h1 style="font-size: 6; font-weight: bold; color: black;">创梦科技网站管理后台</h1>
          </li>
        </ul>
        <ul class="layui-nav layui-layout-right" lay-filter="layadmin-layout-right">
          
          <!-- <li class="layui-nav-item" lay-unselect>
            <a lay-href="app/message/index.html" layadmin-event="message" lay-text="消息中心">
              <i class="layui-icon layui-icon-notice"></i>  
              
              如果有新消息，则显示小圆点
              <span class="layui-badge-dot"></span>
            </a>
          </li>
          <li class="layui-nav-item layui-hide-xs" lay-unselect>
            <a href="javascript:;" layadmin-event="theme">
              <i class="layui-icon layui-icon-theme"></i>
            </a>
          </li>
          <li class="layui-nav-item layui-hide-xs" lay-unselect>
            <a href="javascript:;" layadmin-event="note">
              <i class="layui-icon layui-icon-note"></i>
            </a>
          </li> -->
          <li class="layui-nav-item layui-hide-xs" lay-unselect>
            <span style="color: #000;">当前部门&nbsp;&nbsp;</span>
            <select id="changeDept" name="dept" lay-filter="dept" onchange="changeDept(this.value)">
              <%for(item in depts!){%>
              <option value="${item.id}" ${item.id == selectDept ? 'selected': ''}>${item.name}</option>
              <%}%>
            </select>&nbsp;&nbsp;
          </li>
          <li class="layui-nav-item" lay-unselect>
            <h1 id="timerSpan" style="color: black;"></h1>
          </li>
          <li class="layui-nav-item layui-hide-xs" lay-unselect>
            <a href="javascript:;" layadmin-event="fullscreen">
              <i class="layui-icon layui-icon-screen-full"></i>
            </a>
          </li>
          <li class="layui-nav-item" lay-unselect>
            <a href="javascript:;">
              <cite>${session.sysUser.username}</cite>
            </a>
            <dl class="layui-nav-child">
              <dd><a href="javascript:selfInfo()">基本资料</a></dd>
              <dd><a href="javascript:repwd()">修改密码</a></dd>
              <hr>
              <dd><a href="javascript:logout()">退出</a></dd>
            </dl>
          </li>
          
          <li class="layui-nav-item layui-hide-xs" lay-unselect>
            <a href="javascript:;" layadmin-event="about"><i class="layui-icon layui-icon-more-vertical"></i></a>
          </li>
          <li class="layui-nav-item layui-show-xs-inline-block layui-hide-sm" lay-unselect>
            <a href="javascript:;" layadmin-event="more"><i class="layui-icon layui-icon-more-vertical"></i></a>
          </li>
        </ul>
      </div>
      
      <!-- 侧边菜单 -->
      <div class="layui-side layui-side-menu">
        <div class="layui-side-scroll">
          <div class="layui-logo">
            <span><a href="/" target="_blank"><img alt="郑州创梦计算机科技有限公司" src="${ctx}/img/logo.png"/></a></span>
          </div>
          <ul class="layui-nav layui-nav-tree" lay-shrink="all" id="LAY-system-side-menu" lay-filter="layadmin-system-side-menu">
              <#menu/>
          </ul>
        </div>
      </div>

      <!-- 页面标签 -->
      <div class="layadmin-pagetabs" id="LAY_app_tabs">
        <div class="layui-icon layadmin-tabs-control layui-icon-prev" layadmin-event="leftPage"></div>
        <div class="layui-icon layadmin-tabs-control layui-icon-next" layadmin-event="rightPage"></div>
        <div class="layui-icon layadmin-tabs-control layui-icon-down">
          <ul class="layui-nav layadmin-tabs-select" lay-filter="layadmin-pagetabs-nav">
            <li class="layui-nav-item" lay-unselect>
              <a href="javascript:;"></a>
              <dl class="layui-nav-child layui-anim-fadein">
                <dd layadmin-event="refresh"><a href="javascript:;"><i class="layui-icon layui-icon-refresh-3" aria-hidden="true"></i>刷新当前标签页</a></dd>
                <dd layadmin-event="closeThisTabs"><a href="javascript:;"><i class="layui-icon layui-icon-close" aria-hidden="true"></i>关闭当前标签页</a></dd>
                <dd layadmin-event="closeOtherTabs"><a href="javascript:;"><i class="layui-icon layui-icon-close-fill" aria-hidden="true"></i>关闭其它标签页</a></dd>
                <dd layadmin-event="closeAllTabs"><a href="javascript:;"><i class="layui-icon layui-icon-close-fill" aria-hidden="true"></i>关闭全部标签页</a></dd>
              </dl>
            </li>
          </ul>
        </div>
        <div class="layui-tab" lay-unauto lay-allowClose="true" lay-filter="layadmin-layout-tabs">
          <ul class="layui-tab-title" id="LAY_app_tabsheader">
            <li lay-id="${ctx}/sys_admin/main/welcome" lay-attr="${ctx}/sys_admin/main/welcome" class="layui-this"><i class="layui-icon layui-icon-home"></i></li>
          </ul>
        </div>
      </div>
      
      <!-- 主体内容 -->
      <div class="layui-body" id="LAY_app_body">
        <div class="layadmin-tabsbody-item layui-show">
          <iframe src="${ctx}/sys_admin/main/welcome" frameborder="0" class="layadmin-iframe"></iframe>
        </div>
      </div>
      
      <!-- 辅助元素，一般用于移动设备下遮罩 -->
      <div class="layadmin-body-shade" layadmin-event="shade"></div>
    </div>
  </div>

</body>
</html>


